package com.suneee.base.util;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class SueCloudDateUtil {

	/**
	 * 上次更新时间加上指定的分钟数 
	 * @param lastSynTime
	 * @param minute
	 * @return
	 * @throws Exception
	 */
	public static Date getEndTime(Date lastSynTime,int minute) throws Exception{
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String dateStr = sdf.format(lastSynTime.getTime());
		
		Date date = sdf.parse(dateStr);
		Calendar ca=Calendar.getInstance();
		ca.setTime(date);
		ca.add(Calendar.MINUTE, minute);
		return ca.getTime();
	}
}
